<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('个码预充值列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            账号：<input type="text" name="account"/>
                        </li>
                        <li>
                            码商代理：<select name="channelUserId">
                            <option value=""></option>
                            <option th:each="user1:${channels}" th:value="${user1.userId}"
                                    th:text="${user1.userName}"></option>
                        </select>
                        </li>
                        <li>
                            支付类型：<select id="payType" name="payType">
                            <option value="">所有</option>
                            <option th:each="dict : ${payerPayTypes}" th:text="${dict.payLabel}"
                                    th:value="${dict.payType}"></option>
                        </select>
                        </li>
                        <li>
                            充值金额：<input type="text" name="payAmount"/>
                        </li>
                        <li>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('channel:channelAccountAmount:edit')}]];
    var prefix = ctx + "channel/channelAccountAmount";
    var datastatus = [[${@dict.getType('sys_order_status')}]];
    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "个码预充值",
            showExport: true,
            sortName: "createTime",
            sortOrder: "desc",
            columns: [
                {
                    field: 'accountCashId',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'accountId',
                    title: '账号id',
                    visible: false
                },
                {
                    field: 'account',
                    title: '账号',
                    sortable: true
                },
                {
                    field: 'channelUserName',
                    title: '码商代理'
                },
                {
                    field: 'amount',
                    title: '到账金额',
                    sortable: true
                },
                {
                    field: 'payLabel',
                    title: '支付类型'
                },
                {
                    field: 'orderId',
                    title: '订单编号',
                    sortable: true
                },
                {
                    field: 'createTime',
                    title: '创建时间',
                    sortable: true
                },
                {
                    field: 'payAmount',
                    title: '充值金额',
                    sortable: true
                },
                {
                    field: 'opType',
                    title: '操作类型'
                },
                {
                    field: 'orderStatus',
                    title: '订单状态',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(datastatus, value);
                    },
                    sortable: true
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>